#!/bin/bash
#
# ==========================================================
GA_HOME=/share/apps/ga
GA_BUILD=${GA_HOME}/build
GA_CLASSDIR=${GA_BUILD}/classes
GA_WORKDIR=${GA_HOME}/work
GA_SRCTOP=${GA_WORKDIR}/src/jaga/org/jaga
LIBROOT=${GA_HOME}/lib

JAVAC=${JAVA_HOME}/bin/javac
JAR=${JAVA_HOME}/bin/jar

SOURCES="${GA_SRCTOP}/definitions/*.java \
${GA_SRCTOP}/exampleApplications/*.java \
${GA_SRCTOP}/exampleApplications/proteinLocation/*.java \
${GA_SRCTOP}/fitnessEvaluation/largerNumbers/*.java \
${GA_SRCTOP}/fitnessEvaluation/multiplexer/*.java \
${GA_SRCTOP}/fitnessEvaluation/proteinLocation/*.java \
${GA_SRCTOP}/hooks/*.java \
${GA_SRCTOP}/individualRepresentation/booleanFormulas/*.java \
${GA_SRCTOP}/individualRepresentation/greycodedNumbers/*.java \
${GA_SRCTOP}/individualRepresentation/proteinLocation/*.java \
${GA_SRCTOP}/masterAlgorithm/*.java \
${GA_SRCTOP}/reproduction/*.java \
${GA_SRCTOP}/reproduction/booleanFormulas/*.java \
${GA_SRCTOP}/reproduction/booleanFormulas/nodes/*.java \
${GA_SRCTOP}/reproduction/greycodedNumbers/*.java \
${GA_SRCTOP}/reproduction/proteinLocation/*.java \
${GA_SRCTOP}/selection/*.java \
${GA_SRCTOP}/util/*.java"


# ==========================================================
CP=

echo "${JAVAC} -d ${GA_CLASSDIR} -classpath ${CP} -nowarn ${SOURCES}"
${JAVAC} -d ${GA_CLASSDIR} -classpath ${CP} -nowarn ${SOURCES} 

echo "${JAR} -cf ${LIBROOT}/jaga.jar -C ${GA_CLASSDIR} org"
${JAR} -cf ${LIBROOT}/jaga.jar -C ${GA_CLASSDIR} org
